<template>
    <div class="string-node">
        <base-node :pname="pname">
            <template #begin>
                <span class="type">string</span>
                <span style="margin-right:0.2em">"</span>
            </template>
            <template #default>
                <span>{{ pvalue }}</span>
            </template>
            <template #end>
                <span style="margin-left:0.2em">"</span>
            </template>
        </base-node>
    </div>
</template>

<script lang="ts">
import { Component, Prop, Vue } from "vue-property-decorator";
import BaseNode from "@/components/ObjectCom/BaseNode.vue";

@Component({
    components: {
        BaseNode
    }
})
export default class StringNode extends Vue {
    @Prop() public pname!: string;
    @Prop() public pvalue!: string;
}
</script>

<style lang="less" scoped>
.string-node {
    > .base-node > .head > .begin {
        > .type {
            color: #52c41a;
            margin-right: 0.5em;
        }
    }
}
</style>
